package com.babble.comment.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.Date;

/**
 * 举报评论实体
 *
 * @author wm
 */
@Data
@Document("babble_report")
@ApiModel(value = "举报模型", description = "举报表模型")
public class Report implements Serializable {

	@Id
	@ApiModelProperty("举报评论id")
	private String id;

	@Field("informant_id")
	@ApiModelProperty("举报人id")
	private String informantId;

	@Field("defendant_id")
	@ApiModelProperty("被举报人id")
	private String defendantId;

	@Field("comment_id")
	@ApiModelProperty("举报的评论id")
	private String commentId;

	@ApiModelProperty("举报原因")
	private String content;

	@ApiModelProperty("举报来源：1：博客信息、2、问答、3：留言板、4：关于")
	private Integer source;


	@ApiModelProperty(value = "进展状态", notes = "进展状态: 0: 未查看   1: 已查看  2：已处理")
	private Integer progress;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@Field("create_time")
	@CreatedDate
	private Date createTime;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@Field("update_time")
	@LastModifiedDate
	private Date updateTime;
}

/*
db.babble_report.insert({
	"informant_id":"123456789",//举报人id
	"defendant_id":"987654321",//被举报人
	"commont_or_reoly_id": ObjectId("61821de0b7710000b40043d7"),//举报的评论或回复id
	"content":"举报的原因",//举报原因
	"progress":0,//1进展状态: 0 未查看   1: 已查看  2：已处理
	"create_time":new Date(),
	"update_time":new Date()
	})*/
